home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 37
/
Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso
/
Aminet
/
dev
/
misc
/
AmiPalmDev.lha
/
AmiPalmDev.txt
< prev
next >
Wrap
Text File
|
2000-04-10
|
7KB
|
195 lines
AmiPalmDev
============
Version: 1.0
James S Perrin: <j.perrin@mcc.ac.uk>
Time-stamp: <Tuesday 04/04/00 23:45:14 nobody>
Brief
The GNU package prc-tools-2.0 (in addition to other packages) allows
you to develop programs for PalmPilot PDAs. This archive contains
additional files and instructions to be able to build prc-tools-2.0
under AmigaOS.
Introduction
When I bought my PalmPilot (IIIx) one the reasons ws the thought of
being able to write programs for it as I was aware of the GNU
development package prc-tools. After compiling the development tools
under Linux/m68k I wanted to try and get things working under
AmigOS. After a lot of sweat and nearly giving up twice I was
successful. Unfortunately I had no prior knowledge of how binutils or
gcc was put together so for someone else it might have been less
painful (especially with an 060 and plenty of memory). This file and
the others are to result, it's not pretty but hopefully it'll work for
you.
Prc-tools actually only supplies tools to assemble various pieces into
Palm resource files (.prc) you additional need binutils, gcc and pilrc
which creates the UI for your applications. In addition you'll need
ths PalmOS SDK available from http://www.palm.com/devzone/
. Follow the link for the GNU development for complete information
though I'll give brief notes here aswell.
System Requirements
An amiga you're happy is fast enough to compile binutils and gcc
before you die of old age (my 030/50 took approx 15 hrs in total).
20MB of memory and that may be cutting it fine (see below)
Geek Gadgets distribution including bison, flex and gcc/g++ 2.95.1 you
can possibly use egc1.X but prc-tools contains C++ that doesn't
compile under 2.7.X.
A Palm Pilot and link software unless you're insane.
Nitty Gritty
Download to following files from the URL above: prc-tools-2.0.tar.gz -
2.1 may be availble when you read this which fixes some floating point
errors prc-tools-samples.tar.gz - useful for testing it all works
binutils-2.9.1.tar.gz gcc-2.95.2.tar.gz palmos_sdk-1-2-3.1.tar.gz
palmos_sdk-3.5.tar.gz - only if you wish to use features in the latest
PalmOS pilrc.tar.gz
Don't bother with the debugger gdb as you need a palmpilot emulator to
make use of it.
o Unpacking and Patching
First uncompress prc-tools-2.0 into gg:local/palmdev, if you don't
know how to uncompress gzipped tar files give up now ;). We basically
follow the instructions in prc-tools-2.0/BUILDING.html so I'll just
point out the differences.
Copy this file and *-amigaos-host.diff to prc-tools-2.0
When creating the link sdk use
> makelink sdk sdk-2 FORCE
and to prevent confusion add a filenote to the link
> filenote sdk "-->sdk-2"
I don't like links under amigaos but other than copying one of the
sdk's there no other option.
Rather uncompressing binutils-2.9.2 and gcc-2.95.2 into palmdev and
creating links from prc-tools-2.0 I prefer to uncompress into
prc-tools-2.0 and rename them to binutils and gcc respectively. Links
under AmigaOS are confusing, but it's up to you. Also create empty
directorys gdb and make to keep the configure script happy
Assuming you've done as I have apply the palmos diffs
> cd binutils
> patch -p1 < /binutils-2.9.1-palmos.diff
> cd /gcc
> patch -p1 < /gcc-2.9.2-palmos.diff
These should apply completely cleanly
Now apply the AmigaOS host diffs
> cd binutils
> patch -p3 < /binutils-amigos-host.diff
> cd /gcc
> patch -p0< /gcc-amigaos-host.diff
These should allow apply with a few warnings that offsets had to be
applied (see below for explanation)
Some c files are generated by bison and flex though they are in the
archives they need to be regenerated because their *.y files have been
patched. Do this by simply deleting them, the makefiles will recreate
them later.
> delete binutils/gas/m68k_parse.c
> delete binutils/binutils/arparse.c
> delete binutils/binutils/arlex.c
> delete gcc/gcc/c_parse.c
o Configuring
You should be ready to run the configure script from the build
directory now. To be on the save side I run configure scripts and
makefiles from a sh shell as it understands UN*X style paths etc.
If the amiga host diff where applied correctly the first thing they
should do is allow the configuration to find the host and build
enviroment as m68k-unknown-amigaos
o Building and Installing
Follow the instructions in the docs but make sure that you have
/usr/local/bin in sh's path as binutils are installed here which gcc
needs. This will probably be different from the path set under
AmigaOS, check with
sh> echo $PATH
if /usr/local/bin doesn't appear
sh> export PATH=$PATH:/usr/local/bin
(USR: should be assigned to GG: as so appear to GNU tools as /usr for
compatiblity with UN*X)
Hopefully everything should compile and install OK but it will take
ages so it's more of a case of going and have a life than making a cup
of tea.
o Possible things that will $%@$! up
docs make fail the compile and instal unless you have all to correct
makeinfo texi2* programs if your not bother (they're the same as the
original docs mostly) you can happy ignore these errors and carry on
with the next make/install as they always are the last thing in the
list the do.
Despite the fixinc fix specified in to docs I still had make all-gcc
failing because of problems with this. Performing a
sh> touch build/gcc/gcc/fixinc/stmp-fixinc
stops it from bothering
Final Words
As I mentioned in the introduction it was a pain getting this working
such as it is, mainly because the amiga support required had to be
taken from the GeekGadget diffs for the amiga versions of binutils and
gcc. These are not small and are 95% concerned with amigaos as the
target. This required compiling until something fell over and they
trying to find the patch in 300k of diffs that would fix it. Also
diffs were only available at the time for gcc-2.95.1 which may have
caused some problems.
Second thing is I mentioned is you need >=20MB of memory this is
because my machine has only 18MB! Everything compiles except cc1plus
which I can't get to link together and so I don't have C++ available
under AmigaOS. This is especially annoying as one of the main programs
I wished to port was written in C++.
"I would therefore be very grateful if someone manages to follow
my ramblings words they could send me this file."
It's highly likely I forgotten to mention something so if you run into
problems let me know as it may jog my memory - I made very rough notes
on my progress and I haven't done a recompile from scratch with these
as it takes too long and I like to get out into the sunshine now and
again :)
Hopefully these files should be of use and I look forward the seeing
"Built On Amiga" logos all over PalmGear!